projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2b7a43
)
Added tests for dos unibyte decoding.
author
Andrew Hyatt
<ahyatt@gmail.com>
Sat, 21 May 2016 04:08:27 +0000
(
00:08
-0400)
committer
Andrew Hyatt
<ahyatt@gmail.com>
Sat, 21 May 2016 04:13:43 +0000
(
00:13
-0400)
The underlying bug was previously fixed by Eli Zaretskii in commit
c8109d9c4057d8cac79e2c139758cadd410e7446
.
test/lisp/legacy/coding-tests.el
patch
|
blob
|
history
diff --git
a/test/lisp/legacy/coding-tests.el
b/test/lisp/legacy/coding-tests.el
index cba8c7bc25f00283989d9965de6a2f9e61753b4c..772c8735519b87b1c5de68f3078a4fff82743f62 100644
(file)
--- a/
test/lisp/legacy/coding-tests.el
+++ b/
test/lisp/legacy/coding-tests.el
@@
-48,3
+48,11
@@
(let ((coding-system-for-write (intern "\"us-ascii\"")))
(write-region "some text" nil test-file))))
(coding-tests-remove-files)))
+
+;; See issue #5251.
+(ert-deftest ert-test-unibyte-buffer-dos-eol-decode ()
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert (encode-coding-string "あ" 'euc-jp) "\xd" "\n")
+ (decode-coding-region (point-min) (point-max) 'euc-jp-dos)
+ (should-not (string-match-p "\^M" (buffer-string)))))